Skip to content

fix(host-agent): start extension sidecars during install#1021

Merged
Lightheartdevs merged 1 commit intoLight-Heart-Labs:mainfrom
yasinBursali:fix/host-agent-install-no-deps
Apr 27, 2026
Merged

fix(host-agent): start extension sidecars during install#1021
Lightheartdevs merged 1 commit intoLight-Heart-Labs:mainfrom
yasinBursali:fix/host-agent-install-no-deps

Conversation

@yasinBursali
Copy link
Copy Markdown
Contributor

What

Remove --no-deps from the docker compose up -d call inside _handle_install() so that extension sidecar services and cross-extension depends_on targets start correctly when an extension is installed.

Why

_handle_install() called docker compose up -d --no-deps <service>, which tells Compose to bring up only the named service and skip everything it depends on. Extensions that declare private sidecar containers in their own compose fragment (e.g. a paperless extension shipping its own postgres and redis) had those sidecars silently ignored. Cross-extension depends_on relationships (e.g. perplexica → searxng) were also skipped, leaving services in a broken state after install.

How

One-character change: drop "--no-deps" from the subprocess.run argv in _handle_install() (line 1151 of bin/dream-host-agent.py). docker_compose_recreate() — used for core-service force-recreate after a model swap — retains --no-deps intentionally; that call site is unchanged.

Testing

  • 40/40 tests pass in dashboard-api/tests/test_host_agent.py
  • New TestInstallStartCommandNoDeps regression test uses inspect.getsource (file's existing pattern) to lock the argv shape for both paths:
    • test_install_up_command_does_not_pass_no_deps — asserts --no-deps absent from _handle_install
    • test_docker_compose_recreate_still_uses_no_deps — asserts --no-deps present in docker_compose_recreate
  • No behaviour change for single-service extensions (they have no deps to start)

Platform Impact

  • macOS / Linux / Windows-WSL2: identical — the host agent is a platform-agnostic Python daemon; this code path runs on all platforms.

Known Considerations

Follow-up candidate: the subprocess argv in _run_install could be extracted into module-level helpers to enable direct argv-mock tests rather than source inspection. Good candidate for a standalone refactor PR if the pattern spreads.

_handle_install() passed --no-deps to `docker compose up -d`, so any
service declared in an extension's own compose fragment beyond the
primary one (e.g. paperless-postgres/redis, cross-extension deps on
searxng) never started. Drop --no-deps from the install path. Leave it
on docker_compose_recreate() where skipping peers during a forced
recreate is intentional.

Regression test in tests/test_host_agent.py asserts the install argv
no longer contains --no-deps and the recreate argv still does.
@Lightheartdevs Lightheartdevs merged commit 791cf37 into Light-Heart-Labs:main Apr 27, 2026
27 of 28 checks passed
yasinBursali added a commit to yasinBursali/DreamServer that referenced this pull request Apr 28, 2026
…lainers

PR Light-Heart-Labs#1021 dropped --no-deps from the install command path. Three comments
in this branch's neighborhood still referenced the old form when
explaining WHY the post-install core recreate is needed:

  bin/dream-host-agent.py:348   docstring of _post_install_core_recreate
  bin/dream-host-agent.py:1260  call-site comment in _handle_install
  tests/test_host_agent.py:328  comment block above TestPostInstallCoreRecreate

The underlying causal claim is unchanged: docker compose up -d <ext>
won't recreate already-running siblings without --force-recreate. Comments
now describe the present-day install command accurately, with the missing
--force-recreate flag named as the reason recreate is required, instead
of the no-longer-passed --no-deps flag.

No behaviour change. 45 host-agent tests still pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants